﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace bmapi.Models.CADModel
{
    #region ERp数据
    public class td
    {
        public order order { get; set; }
        public List<fabric> fabricList { get; set; }
        public List<select> partList { get; set; }
        public List<param> modelParam { get; set; }
        public List<string> measureName { get; set; }
        public List<person> personList { get; set; }
        public td()
        {
            this.modelParam = null;
        }
    }
    public class order
    {
        /// <summary>
        /// 样式ID
        /// </summary>
        public string modelID { get; set; }
        /// <summary>
        /// 样式号
        /// </summary>
        public string modelName { get; set; }
        /// <summary>
        /// 生产单ID 
        /// </summary>
        public int orderID { get; set; }
        /// <summary>
        /// 生产单号 ET使用名称 加子序号
        /// </summary>
        public string orderName { get; set; }
        /// <summary>
        /// 生产单号  不加子序号 
        /// </summary>
        public string erpName { get; set; }
        /// <summary>
        /// ERP系统中的子合同单号，如上衣，裤子是一个合同，但是不同的子合同
        /// </summary>
        public int subName { get; set; }
        ///// <summary>
        ///// 上衣 品类
        ///// </summary>
        //public string type { get; set; }
        ///// <summary>
        ///// 款名
        ///// </summary>
        //public string style { get; set; }

        /// <summary>
        /// 订单人数
        /// </summary>
        public int number { get; set; }
        /// <summary>
        /// 时间戳
        /// </summary>
        public DateTime timeStamp { get; set; }
        /// <summary>
        /// 是否加急
        /// </summary>
        public string isAlarm { get; set; }
        /// <summary>
        /// 备注 
        /// </summary>
        public string depiction { get; set; }
        /// <summary>
        /// 订单性质
        /// </summary>
        public string schemetype { get; set; }
        /// <summary>
        /// 交货时间
        /// </summary>
        public string overTime { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>
        public string customerName { get; set; }
        public order()
        {
            modelID = "";
            timeStamp = DateTime.Now;
        }
    }
    public class fabric
    {
        /// <summary>
        /// 物料在CAD里面的名称,这个值在某些系统中可能没有
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 物料影射名，这个字段可以没有
        /// </summary>
        public string productName { get; set; }
        /// <summary>
        /// 物料在ERP当中的唯一标识
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 色号,有的ERP系统需要(物料编码+色号)才能唯一标定一个物料,有些ERP不需要,则此元素为空
        /// </summary>
        public string color { get; set; }
        /// <summary>
        /// 幅宽,浮点数,厘米
        /// </summary>
        public string width { get; set; }
        /// <summary>
        /// 是否可以旋转
        /// </summary>
        public bool dir { get; set; }
        /// <summary>
        /// 缩水
        /// </summary>
        public double xShark { get; set; }
        public double yShark { get; set; }
        /// <summary>
        /// 格子的宽度
        /// </summary>
        public double xWidth { get; set; }
        public double yWidth { get; set; }
        public fabric()
        {
            this.name = "面A";
            this.productName = "";
            this.ID = "";
            this.dir = false;
            this.xShark = 0;
            this.yShark = 0;
            this.yWidth = 0;
            this.xWidth = 0;
        }
    }
    public class select
    {
        /// <summary>
        /// 名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 值
        /// </summary>
        public string val { get; set; }
    }
    public class param
    {
        /// <summary>
        /// 名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 值
        /// </summary>
        public double val { get; set; }
    }
    public class person
    {
        /// <summary>
        /// 人名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string phone { get; set; }
        /// <summary>
        /// ID
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 件数
        /// </summary>
        public string copys { get; set; }
        /// <summary>
        /// 尺码
        /// </summary>
        public string sizeName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 测量值
        /// </summary>
        public List<double> measureVal { get; set; }
        /// <summary>
        /// 特体
        /// </summary>
        public string pod { get; set; }
        public string depend { get; set; }
        public string overCross { get; set; }
        public List<float> rounding { get; set; }
        public person()
        {
            pod = null;
            depend = null;
            overCross = null;
            rounding = null;
            phone = "";
        }
    }

    public class PersonLsh : person
    {
        public int LSH { get; set; }
        public bool IsPod { get; set; }
        public PersonLsh() { }
        public PersonLsh(person per, int lsh, bool isPod = false)
        {
            name = per.name;
            ID = per.ID;
            copys = per.copys;
            sizeName = per.sizeName;
            measureVal = per.measureVal;
            pod = per.pod;
            depend = per.depend;
            overCross = per.overCross;
            rounding = per.rounding;
            LSH = lsh;
            IsPod = isPod;
        }
    }


    //public class person
    //{
    //    /// <summary>
    //    /// 人员ID
    //    /// </summary>
    //    public string ID { get; set; }
    //    /// <summary>
    //    /// 姓名
    //    /// </summary>
    //    public string name { get; set; }
    //    /// <summary>
    //    /// 手机
    //    /// </summary>
    //    public string phone { get; set; }
    //    /// <summary>
    //    /// 备注
    //    /// </summary>
    //    public string remark { get; set; }
    //    /// <summary>
    //    /// 同样的衣服做几件
    //    /// </summary>
    //    public int copys { get; set; }
    //    /// <summary>
    //    /// 套体号型
    //    /// </summary>
    //    public string sizeName { get; set; }
    //    /// <summary>
    //    /// 测量值数组名
    //    /// </summary>
    //    public List<double> measureVal { get; set; }
    //}
    #endregion

}